import hasRole from './hasRole'
import hasPermi from './hasPermi'
import hasPermiSingle from './hasPermiSingle'
import htmlEscape from '../htmlEscape'
import fitColumns from '../fit-columns'

const install = function(Vue) {
  Vue.directive('hasRole', hasRole)
  Vue.directive('hasPermi', hasPermi)
  Vue.directive('hasPermiSingle', hasPermiSingle)
  Vue.directive('htmlEscape', htmlEscape)
  Vue.directive('fitColumns', fitColumns)
}

if (window.Vue) {
  window['hasRole'] = hasRole
  window['hasPermi'] = hasPermi
  window['hasPermiSingle'] = hasPermiSingle
  window['fitColumns'] = fitColumns
  Vue.use(install); // eslint-disable-line
}

export default install
